package com.yedean.mall.token;

import lombok.Data;

import java.util.Date;

/**
 * AccessTokenEntity
 *
 * @author yedean
 * @date 2022/8/17
 */
@Data
public class AccessTokenEntity {
    
    public final static String REFRESH_TOKEN_KEY="refreshToken";
    
    public final static String USER_INFO_KEY="userInfo";

    private String accessToken;

    private String refreshToken;

    private com.yedean.mall.token.UserInfo userInfo;

    private Date expireIn;

    public AccessTokenEntity(String accessToken, String refreshToken, UserInfo userInfo) {
        this(accessToken, refreshToken, userInfo, null);
    }

    public AccessTokenEntity(String accessToken, String refreshToken, UserInfo userInfo, Date expireIn) {
        this.accessToken = accessToken;
        this.refreshToken = refreshToken;
        this.userInfo = userInfo;
        this.expireIn = expireIn;
    }
    
}
